﻿using ERP.ERPSystem.Homepage;
using ERP.Team.WarehouseManagement;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace ERP.Web.Controllers.Homepage
{
    /// <summary>
    /// 首页-xzc
    /// </summary>
    public class HomePagesController : Controller
    {
        private readonly IHomePagesServices _homepagesserviecs;

        public HomePagesController(IHomePagesServices homepagesserviecs)
        {
            _homepagesserviecs = homepagesserviecs;
        }

        /// <summary>
        /// 首页视图
        /// </summary>
        /// <returns></returns>
        public IActionResult HomePageView()
        {
            return View();
        }
        /// <summary>
        /// 查询出库存现有量的数据
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<List<Inventory>> GetInventory()
        {
            var i = await _homepagesserviecs.GetInventory();
            return i;
        }
    }
}
